package cn.zf233.xcloud.service;

import cn.zf233.xcloud.entity.File;
import cn.zf233.xcloud.entity.User;
import org.springframework.data.elasticsearch.core.query.CriteriaQuery;

import java.util.List;

/**
 * Created by zf233 on 2021/4/10
 */
public interface SearchService {

    void buildIndex();

    void clearIndex();

    List<File> search(User user, String keyword);

    List<File> search(CriteriaQuery query);

    List<File> classify(User user, Integer classify);

    List<File> recycle(User user);

    void insertBatch(List<File> fileList);

    void deleteBatch(List<File> fileList);

    void insertOrUpdateOne(File file);

    void deleteOne(File file);

}
